package org.jeecg.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.domain.Goods;
import org.jeecg.domain.History;

import java.util.List;

@Mapper
public interface HistoryMapper {

    @Select("select goods.* from goods,history where goods.id = history.good_id and history.username = #{username}")
    List<Goods> getGoodsByUsername(String username);

    @Insert("insert into history (id,username,good_id,create_time) values (#{id},#{username},#{goodId},#{createTime})")
    Integer insertHistory(History history);


}
